package com.jingxi.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jingxi.common.pojo.JingXiResult;
import com.jingxi.mapper.TbItemParamItemMapper;
import com.jingxi.model.TbItemParamItem;
import com.jingxi.model.TbItemParamItemExample;

@Service
public class ItemParamItemServiceImpl implements ItemParamItemService {

	@Autowired
	private TbItemParamItemMapper tbItemParamItemMapper;
	
	@Override
	public JingXiResult getItemParamItem(long id) {
		TbItemParamItemExample tbItemParamItemExample = new TbItemParamItemExample();
		tbItemParamItemExample.createCriteria().andItemIdEqualTo(id);
		List<TbItemParamItem> lists = tbItemParamItemMapper.selectByExampleWithBLOBs(tbItemParamItemExample);
		if(lists.size()==1)return JingXiResult.ok(lists.get(0));
		return JingXiResult.ok();
	}



}
